package org.atlantis.grosbeak.logger.adapter;

import org.atlantis.grosbeak.logger.Logger;

public abstract class BaseLogger implements Logger {
	
	protected boolean isFatalEnabled = true;
	protected boolean isErrorEnabled = true;
	protected boolean isWarnEnabled = true;
	protected boolean isInfoEnabled = false;
	protected boolean isDebugEnabled = false;
	protected boolean isTraceEnabled = false;
	
	public void debug(Object message) {
		debug(message, null);
	}

	public void debugFmt(String format, Object... args) {
		debug(String.format(format, args));
	}
	
	public void error(Object message) {
		error(message, null);
	}
	
	public void errorFmt(String format, Object... args) {
		error(String.format(format, args));
	}
	
	public void fatal(Object message) {
		fatal(message, null);
	}
	
	public void fatalFmt(String format, Object... args) {
		fatal(String.format(format, args));
	}
	
	public void info(Object message) {
		info(message, null);
	}
	
	public void infoFmt(String format, Object... args) {
		info(String.format(format, args));
	}
	
	public void trace(Object message) {
		trace(message, null);
	}
	
	public void traceFmt(String format, Object... args) {
		trace(String.format(format, args));
	}
	
	public void warn(Object message) {
		warn(message, null);
	}
	
	public void warnFmt(String format, Object... args) {
		warn(String.format(format, args));
	}
	
	public boolean isDebugEnabled() {
		return isDebugEnabled;
	}
	
	public boolean isErrorEnabled() {
		return isErrorEnabled;
	}
	
	public boolean isFatalEnabled() {
		return isFatalEnabled;
	}
	
	public boolean isInfoEnabled() {
		return isInfoEnabled;
	}
	
	public boolean isTraceEnabled() {
		return isTraceEnabled;
	}
	
	public boolean isWarnEnabled() {
		return isWarnEnabled;
	}
}
